
var SfFormGui = Class.create({
    
    initialize: function() {
        $$('.sf-form-gui .actions .link').each(function(el) {
            el.observe('click', function(event) {
                event.stop();
                new Ajax.Updater( event.findElement('a').up().previous('.form'), event.findElement('a').href, {
                    success: function(xhr, json) {
                        console.log(xhr);
                    }
                })
            });
        });
    }
});

Event.observe( document, 'dom:loaded', function(event) {
    new SfFormGui();
});
